package chixing.day05;

/**
 * 店铺类
 * public:修饰的属性，方法，其他类都能访问
 * private：修饰的属性，方法，只有本类能访问
 *  安全性 1.源数据不被暴露出去
 *  耦合性低 该类的属性只有本类自己管理
 *  this 当前对象：this（谁调用该方法，谁就是当前对象）
 *  方法的重载  overload
 *  方法名相同
 *  参数列表不同（类型不一样，数量不一样，顺序不一样）
 */
public class Shop {
    private int shopId;
    private String shopName;
    private String branchName;
    private float shopScore;

    //默认省略  无参构造函数 constructor
    //构造函数的作用  初始化对象（initial object ）/int/ init
    public Shop() {

    }
    public Shop(int shopId, String shopName, String branchName) {
        this.shopId = shopId;
        this.shopName = shopName;
        this.branchName = branchName;
    }

    public Shop(int shopId, String shopName, String branchName, float shopScore) {
        this.shopId = shopId;
        this.shopName = shopName;
        this.branchName = branchName;
        this.shopScore = shopScore;
    }
    //有参构造函数
    //形式参数（形参：parameter）

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getBranchName() {
        return branchName;
    }

    public void setBranchName(String branchName) {
        this.branchName = branchName;
    }

    public float getShopScore() {
        return shopScore;
    }

    public void setShopScore(float shopScore) {
        this.shopScore = shopScore;
    }
}
